Profiler Class
Description:
A class for profiling functions.
EventName
Type: Readonly Field.
Description:
The name of the profiling event.
Signature:
const EventName: string
level
Type: Field.
Description:
The current level of profiling.
Signature:
level: integer
__call
Type: Metamethod.
Description:
Calls a function and return the amount of time it took to execute.
Signature:
metamethod __call: function(self: ProfilerClass, funcForProfiling: function): number
Usage:
local time = Profiler(myFunction)
Parameters:
Parameter | Type | Description |
---|---|---|
funcForProfiling | function | The function to profile. |
Returns:
Return Type | Description |
---|---|
number | The amount of time it took to execute the function. |